#ifndef QMLADVANCEDANALYSISCONFIG_H
#define QMLADVANCEDANALYSISCONFIG_H

#include <QObject>
#include <QQmlContext>
#include <QQuickWidget>

class QMLAdvancedAnalysisConfig : public QQuickWidget
{
    Q_OBJECT
public:
    QMLAdvancedAnalysisConfig();


/* QML接口 */
public:
    Q_INVOKABLE void        reanalysis(QString target, QVariantMap params);
    Q_INVOKABLE QVariantMap getParams(QString target);
    Q_INVOKABLE QVariantMap getDefaultParams();

    Q_INVOKABLE void        setBoldCurveList(QStringList list);
signals:
    void        selectablePosiListChanged(QStringList list);

private:
    QQmlContext*        _rootContext;
    QObject*            _rootObject;


/* 方法 */
public:
    void    setParamsList(QMap<QString, QMap<QString, double>>);
    void    setSelectableList(QStringList);


signals:
    void    sigReanalysis(QString, QMap<QString, double>);
    void    sigSelectCurveChanged(QStringList);

private:

    QMap<QString, QMap<QString, double>>    _curveConfigList;       // 单个曲线的配置
    QMap<QString, QMap<QString, double>>    _channelConfigList;     // 整个通道的配置
    QStringList                             _selectablePosiList;    // 可选的孔位


};

#endif // QMLADVANCEDANALYSISCONFIG_H
